#!/bin/sh

percent=$(cat /sys/class/power_supply/BAT0/capacity)
if [[ $percent -gt 90 ]]; then
	sign=" "
elif [[ $percent -gt 75 ]]; then
	sign=" "
elif [[ $percent -gt 50 ]]; then
	sign=" "
elif [[ $percent -gt 25 ]]; then
	sign=" "
else
	sign=" "
fi

case $(cat /sys/class/power_supply/BAT0/status) in
	"Full" ) label="";;
	"Charging" ) label="";;
	"Discharging" ) label=" ";;
	"Not charging" ) label="";;
	"Unknown" ) label="?";;
  * ) exit 1 ;;
esac

echo "$sign $label $percent%"
